<!DOCTYPE HTML>
<html lang="zh-CN">
<head>
<meta charset="UTF-8">
<meta name="keywords" content="" />
<meta name="description" content="" />
<meta name="HandheldFriendly" content="True">
<meta name="format-detection" content="telephone=no">
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
<meta name="format-detection" content="telephone=no">
<meta http-equiv="cleartype" content="on">
<title>王与异界骑士</title>
<!-- ▼Common CSS -->
<link rel="stylesheet" href="/assets/qishi/wap3.css"/>
<!-- ▲Common CSS -->
<style type="text/css">
.custom-image-swiper-single{margin-top: 0.5px};
#main{height:70px}
img{ width:100%;}
.select{-webkit-user-select:text;-moz-user-select:text;-o-user-select:text;user-select:text;}
.no-select{-webkit-user-select:none;-moz-user-select:none;-o-user-select:none;user-select:none;}
</style>
<link href="/assets/qishi/base.css" type="text/css" rel="stylesheet">
</head>
<body>


<div class="c"  style='width:100%'>
	<div class="swiper-container" style="width:100%">
		<div class="swiper-wrapper" style='width:100%'>
			<div class="swiper-slide"  style='width:100%'>
				 <img class="js-slide-lazy"
					src="/assets/qishi/head.jpg"   />
				
			</div>
		</div>
	</div>
</div>


<div class="" id='getcode' style="margin-top:-1px;width:100%" >
	<div class="swiper-container" style="" id='main' >
		<div class="swiper-wrapper" style='width:100%'>
			<div class="swiper-slide" style="z-index: 0;" >
				 <img class="js-slide-lazy" 	src="/assets/qishi/main.jpg"  id="clickgetcode"  />
				
			</div>
			
		</div>
	</div>
</div>

<div class="" id='showcode' style="display: none;margin-top: -1px;width:100%">
	<div class="swiper-container" style="" id='main' >
		<div class="swiper-wrapper" >
			<div class="swiper-slide" style="z-index: 0;" >
			
				 <img class="js-slide-lazy no-select" src="/assets/qishi/show.jpg"  />
					
				
			</div>
			
			<div class="swiper-slide" style="text-align:center  ;z-index: 999;background-color: none ;position:absolute; display:block; margin-top:-17.5%;width: 100%;" >
			
			  <font style="font-size: 16px;font-weight: bold;line-height: 40px;color:white" color="black" id='showcode_hx'></font>
			</div>
		</div>
	</div>
</div>

<!-- <div class="" id='showcode' style="display:none;margin-top: -1px;width:100%">
	<div class="swiper-container" style="" id='main' >
		<div class="swiper-wrapper" >
			<div class="swiper-slide" style="text-align:center" >
			
				
				<img class="js-slide-lazy no-select"src="/assets/qishi/show.jpg"  />
				<div  class='select' style="position:absolute; display:block; margin-top:-15%;color:white;text-align:center;width:100%;z-index:99999;height: 99px;background-color: red" id='showcode_hx'></div>
			
				
			</div>
			
			<div class="" style="text-align:center   " >
			  
			</div>
		</div>
	</div>
</div>
 -->
<div class="" style="margin-top: -1px;width:100%" >
	<div class="swiper-container" style="">
		<div class="swiper-wrapper">
			<div class="swiper-slide">
				 <img class="js-slide-lazy"
					src="/assets/qishi/footer.jpg"  />
				
			</div>
		</div>
	</div>
</div>


	<script type="text/javascript" src="/assets/qishi/jquery-2.0.3.js"></script>
	<script src="/assets/qishi/base_.js"></script>
	<script src="http://res.wx.qq.com/open/js/jweixin-1.0.0.js"></script>

<script>

wx.config({
    debug: false,
    appId: '<?php echo $signPackage["appId"];?>',
    timestamp: <?php echo $signPackage["timestamp"];?>,
    nonceStr: '<?php echo $signPackage["nonceStr"];?>',
    signature: '<?php echo $signPackage["signature"];?>',
    jsApiList: [
				'onMenuShareTimeline',
				'onMenuShareAppMessage'
    ]
  });
  wx.ready(function () {

	  wx.onMenuShareTimeline({
		    title: '王与异界骑士', // 分享标题
		    link: 'https://open.weixin.qq.com/connect/oauth2/authorize?appid=wxc6066b87ac65dace&redirect_uri=http%3a%2f%2fwq.weixin.nicoworks.com%2findex.php%3fr%3dQishi&response_type=code&scope=snsapi_base&state=123', // 分享链接
		    imgUrl: 'http://7xvgod.com1.z0.glb.clouddn.com/pic_613600.png', // 分享图标
		});

	  wx.onMenuShareAppMessage({
		    title: '王与异界骑士', // 分享标题
		    desc: '王与异界骑士活动', // 分享描述
		    link: 'https://open.weixin.qq.com/connect/oauth2/authorize?appid=wxc6066b87ac65dace&redirect_uri=http%3a%2f%2fwq.weixin.nicoworks.com%2findex.php%3fr%3dQishi&response_type=code&scope=snsapi_base&state=123', // 分享链接
		    imgUrl: 'http://7xvgod.com1.z0.glb.clouddn.com/pic_613600.png', // 分享图标
		});

	    
  });


var Cart = {
	getCode : function(){
		$("#clickgetcode").bind("click",function(){
			jQuery.ajax({ 
				type: "post",
				url : '<?php  echo  Yii::app()->request->baseUrl ?>/index.php?r=Qishi/GetCode', 
				dataType:'json',
			    data:{'openid':'<?php echo  $user_openid ?>'},
				success: function(data){

					if(data.code==0){
						M._alert('恭喜您,领取成功.');
						jQuery("#getcode").hide();
						$('#showcode_hx').html(data.msg);
						jQuery("#showcode").show();
						
					}
					 if(data.code==3){
						M._alert(data.msg);
						jQuery("#getcode").hide();
						$('#showcode_hx').html(data.msg);
						
						jQuery("#showcode").show();
					}

					if(data.code==4){
						M._alert(data.msg);
						jQuery("#getcode").hide();
						$('#showcode_hx').html(data.code_sn);
						
						jQuery("#showcode").show();
					}
				},
			
					error:function(){
						M._alert("服务器出问题了...");
						}
				});
			})
	},

	init : function(){
		Cart.getCode();
		
	},
      getRandCode:function(){
		
		 code = "";   
	     var codeLength = 10;// 
	      
	     var random = new Array(0,1,2,3,4,5,6,7,8,9,'A','B','C','D','E','F','G','H','I','J','K','L','M','N','O','P','Q','R',  
	     'S','T','U','V','W','X','Y','Z');//随机数  
	     for(var i = 0; i < codeLength; i++) {//循环操作  
	        var index = Math.floor(Math.random()*36);//取得随机数的索引（0~35）  
	        code += random[index];//根据索引取得随机数加到code上  
	    }  
	     
	     return code;
	}
};
Cart.init();


/* function copy_code() 
{
	
	var copyText=$('#showcode').html();
    if (window.clipboardData) 
    {
        window.clipboardData.setData("Text",copyText )
    } 
    else 
    {
        var flashcopier = 'flashcopier';
        if(!document.getElementById(flashcopier)) 
        {
          var divholder = document.createElement('div');
          divholder.id = flashcopier;
          document.body.appendChild(divholder);
        }
        document.getElementById(flashcopier).innerHTML = '';
        var divinfo = '<embed src="js/_clipboard.swf" FlashVars="clipboard='+encodeURIComponent(copyText)+'" width="0" height="0" type="application/x-shockwave-flash"></embed>';
        document.getElementById(flashcopier).innerHTML = divinfo;
    }
	M._alert("复制成功.");
} */


</script>

</body>
</html>
